const baseUrl = 'http://192.168.4.18:8000'
function http({
    url,
    success
}){
    wx.request({
        url: baseUrl+url,
        data: {},
        header: {'content-type':'application/json'},
        method: 'GET',
        dataType: 'json',
        responseType: 'text',
        success: (res)=>{
            success(res)
        }
    })
}

function getHttpMovie({
    success
}){
    http({
        url:'/',
        success:res=>{
            success(res)
        }
    })
}

function getHttpBanner({
    success
}){
    http({
        url:'/banner',
        success:res=>{
            success(res)
        }
    })
}

function getHttpCart({
    success
}){
    http({
        url:'/cart',
        success:res=>{
            success(res)
        }
    })
}
module.exports={
    getHttpMovie,
    getHttpBanner,
    getHttpCart
}